<template>
    <el-container class="index-container">
        <div
            class="slider-btn"
            :class="{'slider-btn-show': showSlider}"
            @click="showSlider = !showSlider">
            <i class="iconfont el-icon-hand-paixu" />
        </div>
        <el-aside
            class="aside"
            :class="{'aside-show': showSlider}"
            width="210px">
            <h1>
                <i class="iconfont el-icon-hand-logo" />
                <span>掌上大学</span>
            </h1>
            <el-menu
                :default-active="navActive"
                class="menu"
                unique-opened
                router
                background-color="#002548"
                text-color="rgba(255, 255, 255, .6)"
                active-text-color="#fff">
                <hand-menu :list="menuList" />
            </el-menu>
            <div class="userinfo-wrapper">
                <p class="username">{{ userinfo.username }}</p>
                <div
                    :style="{
                        display: 'flex'
                }">
                    <p
                        class="user_auth"
                        @click="handleCheckAuth()"
                    >
                        权限对照表
                    </p>
                    <el-popover
                        placement="right-end"
                        width="84"
                        trigger="click"
                        popper-class="index-userinfo-popover">
                        <ul>
                            <li @click="dialogVisible = true">修改密码</li>
                            <li @click="handleLogout">退出</li>
                        </ul>
                        <el-button
                            type="text"
                            slot="reference">设置</el-button>
                    </el-popover>
                </div>
            </div>
        </el-aside>
        <el-container v-if="!TO">
            <el-header height="54px">
                <el-row class="header-index">
                    <el-col
                        :span="12"
                        class="header-left"
                    >
                        <el-breadcrumb
                            separator="/"
                            class="bread"
                        >
                            <el-breadcrumb-item
                                v-for="(item, index) in list"
                                :key="index"
                                :to="item.title ? item.path : undefined"
                                :style="{color: '#606266'}"
                            >
                                {{ item.title }}
                            </el-breadcrumb-item>
                        </el-breadcrumb>
                    </el-col>
                    <el-col
                        :span="12"
                        class="header-right">
                        &nbsp;
                    </el-col>
                </el-row>
            </el-header>
            <el-main class="main">
                <router-view/>
            </el-main>
            <el-dialog
                title="修改密码"
                :visible.sync="dialogVisible"
                width="30%">
                <el-form
                    :model="resetPsdForm"
                    :rules="resetPsdRules"
                    ref="ruleForm"
                    label-width="100px"
                    label-position="left"
                    size="medium">
                    <el-form-item
                        label="旧密码"
                        prop="old">
                        <el-input
                            v-model="resetPsdForm.old"
                            type="password" />
                    </el-form-item>
                    <el-form-item
                        label="新密码"
                        prop="new">
                        <el-input
                            v-model="resetPsdForm.new"
                            type="password" />
                    </el-form-item>
                    <el-form-item
                        label="重复新密码"
                        prop="repeat">
                        <el-input
                            v-model="resetPsdForm.repeat"
                            type="password" />
                    </el-form-item>
                </el-form>
                <span
                    slot="footer"
                    class="dialog-footer">
                    <el-button @click="dialogVisible = false">取 消</el-button>
                    <el-button
                        type="primary"
                        @click="handleResetPsd">确 定</el-button>
                </span>
            </el-dialog>
        </el-container>
    </el-container>
</template>

<script>
import { mapState } from 'vuex';
import handMenu from '@/components/common/menu';

export default {
    components: {
        handMenu
    },
    data() {
        var validRepeatPsd = (rule, value, callback) => {
            if (value !== this.resetPsdForm.new) {
                callback(new Error('两次密码输入不一致'));
            }
            callback();
        };

        return {
            // 其他页面跳转过来,需要获取权限列表
            TO: '',
            showSlider: true,//显示左侧导航
            navActive: "",
            userAuth: [],
            userinfo: {
                username: ''
            },
            dialogVisible: false,
            resetPsdForm: {
                old: '',
                new: '',
                repeat: ''
            },
            resetPsdRules: {
                old: [
                    { required: true, message: '请输入旧密码', trigger: 'blur' }
                ],
                new: [
                    { required: true, message: '请输入新密码', trigger: 'blur' }
                ],
                repeat: [
                    { required: true, message: '请重复新密码', trigger: 'blur' },
                    { validator: validRepeatPsd, trigger: 'blur' }
                ]
            },
            menuList: [],
            menuSourceList: [
                {
                    title: '首页',
                    icon: 'shouye',
                    path: '/',
                    isRoot: true,
                },
                {
                    title: '学生信息管理',
                    icon: 'xueshengxinxi',
                    isRoot: true,
                    children: [
                        {
                            title: '学生列表',
                            path: '/student-message/list',
                            auth: ['__auto_by_action:studata-student\\get_list']
                        },
                        {
                            title: '学生统计',
                            path: '/student-message/statistics',
                            auth: ['__auto_by_action:studata-student_statistic\\base_statistic']
                        }
                    ]
                },
                {
                    title: '校园工作室管理',
                    icon: 'xianxialuyan',
                    isRoot: true,
                    children: [
                        {
                            title: '场地管理',
                            path: '/downline/place-list',
                            auth: ['__auto_by_action:ht-roadshow\\area\\edit']
                        },
                        {
                            title: '人员管理',
                            path: '/downline/person-list',
                            auth: ['__auto_by_action:ht-person\\get_ist']
                        }
                    ]
                },
                {
                    title: '任务反馈系统',
                    icon: 'renwu',
                    isRoot: true,
                    children: [
                        {
                            title: '查看小B',
                            path: '/task/agent-user-list',
                            auth: ['__auto_by_action:task-agent\\get_list']
                        },
                        {
                            title: '财务管理',
                            path: '/task/finance-list',
                            auth: ['__auto_by_action:task-finance_user_order\\get_list']
                        },
                        {
                            title: '任务管理',
                            children: [
                                {
                                    title: '任务列表',
                                    path: '/task/task-list',
                                    auth: ['__auto_by_action:task-task\\get_list']
                                },
                                {
                                    title: '任务反馈',
                                    path: '/task/task-review-list',
                                    auth: ['__auto_by_action:task-task_submit\\list']
                                }
                            ]
                        },
                        {
                            title: '班级/学院管理',
                            children: [
                                {
                                    title: '班级管理',
                                    path: '/task/class-list',
                                    auth: ['__auto_by_action:task-task\\get_list']
                                },
                                {
                                    title: '班级审核',
                                    path: '/task/verify-class',
                                    auth: ['__auto_by_action:task-base_class_create_apply\\get_list']
                                },
                                {
                                    title: '学院管理',
                                    path: '/task/academy-list',
                                    auth: ['__auto_by_action:task-task_submit\\list']
                                }
                            ]
                        },
                        // {
                        //     title: '客服管理',
                        //     children: [
                        //         {
                        //             title: '添加客服',
                        //             path: '/task/customer-service-set',
                        //             auth: []
                        //         }
                        //     ]
                        // },
                        {
                            title: '抽奖管理',
                            path: '/task/lottery-list',
                            auth: ['__auto_by_action:task-task\\get_list']
                        },
                    ]
                },
                {
                    title: 'APP后台',
                    icon: 'hand-app',
                    isRoot: true,
                    children: [{
                        title: 'App开屏广告',
                        path: '/student/app-side',
                        auth: []
                    },{
                        title: '应用市场管理',
                        path: '/student/app-config',
                        auth: []
                    },{
                        // 页面访问权限取第一个数据列表接口判断
                        title: '数据分析',
                        children: [{
                            title: '商品数据分析',
                            path: '/student/shop-commodity',
                            auth: ['__auto_by_action:student-statistic_shop\\get_single_goods_statistic']
                        },{
                            title: '导出精英数据',
                            path: '/student/export-elite-data',
                            auth: ['__auto_by_action:student-statistic_stuagent\\get_statistic_list']
                        },{
                            title: '用户数据分析',
                            path: '/student/data-analysis',
                            auth: ['__auto_by_action:student-statistic\\get_student_statistic_list']
                        },{
                            title: '校园精英数据',
                            path: '/student/school-data-analysis',
                            auth: ['__auto_by_action:student-statistic_stuagent\\get_stuagent_stat']
                        },{
                            title: '商城数据大盘',
                            path: '/student/shop-data-analysis',
                            auth: ['__auto_by_action:student-statistic_shop\\get_order_money']
                        },{
                            title: '学习数据大盘',
                            path: '/student/student-data-analysis',
                            auth: ['__auto_by_action:student-statistic_study\\get_index_statistic']
                        },{
                            title: '工作数据大盘',
                            path: '/student/work-data-analysis',
                            auth: ['__auto_by_action:student-statistic_work\\get_index_statistic']
                        },{
                            title: '社交数据大盘',
                            path: '/student/social-data-analysis',
                            auth: ['__auto_by_action:student-statistic_social\\get_match_statistic']
                        },{
                            title: '用户数据大盘',
                            path: '/student/user-data-analysis',
                            auth: ['__auto_by_action:student-statistic_student\\get_all_student_statistic']
                        },{
                            title: '用户行为数据搜索',
                            path: '/student/user-behavior-serach',
                            auth: ['__auto_by_action:student-statistic_social\\get_behavior_student_list']
                        },{
                            title: '活动数据大盘',
                            path: '/student/active-data-analysis',
                            auth: ['__auto_by_action:student-statistic_student\\get_invite_award_user_statistic']
                        }]
                    },{
                        title: '工作',
                        children: [{
                            title: '用户管理',
                            path: '/student/task-user-list',
                            auth: ['__auto_by_action:student-task_user\\get_list']
                        },{
                            title: '企业列表',
                            path: '/student/company-list',
                            auth: ['__auto_by_action:student-company\\get_list']
                        },{
                            title: '工作客服',
                            path: '/student/work-service',
                            auth: ['__auto_by_action:student-hire_kf\\get_list']
                        },{
                            title: '代理类目管理',
                            path: '/student/goods-agent-category',
                            auth: ['__auto_by_action:student-shop_goods_agent_cate\\get_list']
                        },{
                            title: '代理店铺管理',
                            path: '/student/goods-agent-shop',
                            auth: ['__auto_by_action:student-shop_agent\\get_list']
                        },
                        // v2.2.3隐藏
                        /*{
                            title: '远程任务',
                            path: '/student/work-task-up',
                            auth: ['__auto_by_action:student-taskonline\\get_list']
                        },
                        {
                            title: '远程任务报名',
                            path: '/student/work-task-tration',
                            auth: ['__auto_by_action:student-taskonline_student_task\\get_list']
                        },*/
                        {
                            title: '新平台标准任务',
                            children: [
                                {
                                    title: '任务管理',
                                    path: '/student/standard-task-list',
                                    auth: ['__auto_by_action:student-task_stuagent\\get_list']
                                },
                                {
                                    title: '任务领取列表',
                                    path: '/student/standard-task-receive-list',
                                    auth: ['__auto_by_action:student-task_stuagent_student_task\\get_receive_task_list']
                                },
                                {
                                    title: '黑名单',
                                    path: '/student/standard-task-blacklist',
                                    auth: ['__auto_by_action:student-task_stuagent\\student_block\\get_list']
                                }
                            ]
                        },
                        {
                            title: '旧平台标准任务',
                            children: [
                                {
                                    title: '任务管理',
                                    path: '/student/elite-task-list',
                                    auth: ['__auto_by_action:student-task_stuagent\\get_list']
                                },
                                {
                                    title: '任务领取列表',
                                    path: '/student/elite-task-receive-list',
                                    auth: ['__auto_by_action:student-task_stuagent_student_task\\get_list']
                                }
                            ]
                        },
                        {
                            title: '商家远程任务',
                            children: [
                                {
                                    title: '商家任务列表',
                                    path: '/student/shop-project-apply-list',
                                    auth: ['__auto_by_action:student-task_stuagent_for_shop\\get_audit_list']
                                },
                                {
                                    title: '平台二次审核',
                                    path: '/student/shop-project-secondary-verify',
                                    auth: ['__auto_by_action:student-task_stuagent_for_shop\\get_receive_list']
                                },
                                /*{
                                    title: '项目管理列表',
                                    path: '/student/shop-project-list',
                                    auth: ['__auto_by_action:student-task_stuagent_shop_project\\get_list']
                                },
                                {
                                    title: '商家项目数据',
                                    path: '/student/shop-project-statistics',
                                    auth: ['__auto_by_action:student-task_stuagent_for_shop\\get_shop_statistic_list']
                                },
                                {
                                    title: '用户反馈列表',
                                    path: '/student/shop-project-student-feedback-list',
                                    auth: []
                                },*/
                            ]
                        },
                        /*{
                            title: '任务纠纷处理',
                            path: '/student/shop-task-dispute-list',
                            auth: ['__auto_by_action:student-task_stuagent_dispute\\get_list']
                        },*/
                        {
                            title: '邀请好友',
                            children: [
                                {
                                    title: '邀请管理',
                                    path: '/student/invite-manage',
                                    auth: ['__auto_by_action:student-task_stuagent_extra_student_invite_activity\\config\\get_invite_activity_manage_list']
                                },
                                {
                                    title: '邀请者列表',
                                    path: '/student/inviter-list',
                                    auth: ['__auto_by_action:student-task_stuagent_extra_student_invite\\get_invite_user_statistic_list']
                                },
                                {
                                    title: '邀请明细',
                                    path: '/student/invite-friends-list',
                                    auth: ['__auto_by_action:student-task_stuagent_extra_student_invite\\get_invite_list']
                                },
                                {
                                    title: '数据统计',
                                    path: '/student/invite-friends-statistics',
                                    auth: ['__auto_by_action:student-task_stuagent_extra_student_invite\\get_day_statistic_list']
                                }
                            ]
                        },
                        {
                            title: '人力资源',
                            children: [
                                {
                                    title: '招聘企业列表',
                                    path: '/student/recruit-company-list',
                                    auth: ['__auto_by_action:student-work_recruit\\get_company_list']
                                },
                                {
                                    title: '岗位审核',
                                    path: '/student/recruit-post-list',
                                    auth: ['__auto_by_action:student-work_recruit\\shop_apply\\get_audit_list']
                                },
                            ]
                        },

                        //     ,{
                        //     title: '远程项目',
                        //     children: [
                        //         {
                        //             title: '远程任务',
                        //             path: '/student/task-list',
                        //             children: [
                        //                 {
                        //                     title: '任务列表',
                        //                     path: '/student/task-list',
                        //                     auth: ['__auto_by_action:student-task\\get_list']
                        //                 },
                        //                 {
                        //                     title: '任务反馈',
                        //                     path: '/student/task-review-list',
                        //                     auth: ['__auto_by_action:student-task_submit\\list']
                        //                 }
                        //             ]
                        //         },
                        //         {
                        //             title: '远程兼职',
                        //             path: '/student/remote-part-time-list',
                        //             auth: ['__auto_by_action:student-parttime\\get_list']
                        //         }
                        //     ]
                        // },{
                        //     title: '兼职',
                        //     auth: ['__auto_by_action:student-parttime\\get_list'],
                        //     children: [
                        //         {
                        //             title: '兼职列表',
                        //             path: '/student/part-time-list',
                        //             auth: ['__auto_by_action:student-parttime\\get_list']
                        //         }
                        //     ]
                        // },
                        // {
                        //     title: '实习',
                        //     path: '/student/practice-list',
                        //     auth: ['__auto_by_action:student-internship\\get_list']
                        // },{
                        //     title: '首页推荐',
                        //     path: '/student/home-recommend',
                        //     auth: ['__auto_by_action:student-work_recommend\\get_list']
                        // }

                        ]
                    },{
                        title: '学习',
                        children: [
                            {
                                title: '金刚区',
                                path: '/student/work-peter',
                                auth: ['__auto_by_action:student-study_custom_area\\get_list']
                            },{
                                title: '首页推荐',
                                path: '/student/work-home',
                                auth: ['__auto_by_action:student-course_recommend\\get_list']
                            },{
                                title: '类目组',
                                path: '/student/work-page',
                                auth: ['__auto_by_action:student-course_cate\\get_list']
                            },
                            /*{
                                title: '一级类目',
                                path: '/student/work-category',
                                auth: ['__auto_by_action:student-course_type\\get_list']
                            },{
                                title: '二级类目',
                                path: '/student/work-category-to',
                                auth: ['__auto_by_action:student-course_type\\get_list_sub']
                            },{
                                title: '视频列表',
                                path: '/student/study-list',
                                auth: ['__auto_by_action:student-course\\get_list']
                            },*/
                            {
                                title: '发现页视频',
                                path: '/student/study-list-manage',
                                auth: ['__auto_by_action:student-course_find\\get_list']
                            },{

                                title: '课程列表',
                                path: '/student/study-course-list',
                                auth: []
                            },{

                                title: '课程目录管理',
                                path: '/student/study-course-category',
                                auth: []
                            }]
                    },{
                        title: '商城',
                        children: [{
                            title: '首页模块',
                            children: [{
                                title: '页面中的banner位',
                                path: '/student/shop-banner',
                                auth: ['__auto_by_action:student-shop_banner\\get_list']
                            },{
                                title: '活动专区',
                                path: '/student/activity-area',
                                auth: ['__auto_by_action:student-shop_activity\\get_list']
                            },{
                                title: '抽奖商品管理',
                                path: '/student/zd-luck-draw',
                                auth: ['__auto_by_action:student-shop_lottery\\get_list']
                            },{
                                title: '折扣专区',
                                path: '/student/shop-people',
                                auth: ['__auto_by_action:student-shop_goods\\get_new_user_goods_list']
                            },{
                                title: '0元购淘客商品',
                                path: '/student/goods-zero-purchase',
                                auth: ['__auto_by_action:student-shop_free\\get_list']
                            },{
                                title: '0元购自营商品',
                                path: '/student/goods-zero-self',
                                auth: ['__auto_by_action:student-shop_free_self\\get_list']
                            },{
                                title: '0元购心愿单',
                                path: '/student/goods-zero-wish',
                                auth: ['__auto_by_action:student-shop_free_wish\\get_list']
                            },{
                                title: '砍价活动',
                                path: '/student/goods-barg-shop',
                                auth: ['__auto_by_action:student-shop_goods_bargain\\get_list']
                            },{
                                title: '装修模版',
                                path: '/student/active',
                                auth: ['__auto_by_action:student-custom_page\\get_list']
                            },
                            // {
                            //     title: '秒杀自营商品',
                            //     path: '/student/seckill-shop',
                            //     auth: ['__auto_by_action:student-shop_goods_flash_sale\\get_goods_list']
                            // },{
                            //     title: '秒杀淘客商品',
                            //     path: '/student/seckill-tk-shop',
                            //     auth: ['__auto_by_action:student-shop_goods_flash_sale\\get_tao_item_list']
                            // },{
                            //     title: '秒杀管理',
                            //     path: '/student/seckill-admin',
                            //     auth: ['__auto_by_action:student-shop_goods_flash_sale\\get_list']
                            // },
                            ]
                        },{
                            title: '首页模块自定义',
                            path: '/student/app-module-define',
                            auth: ['__auto_by_action:student-shop_home\\get_module_config']
                        },{
                            title: '商品列表',
                            path: '/student/goods-list',
                            auth: ['__auto_by_action:student-shop_goods\\get_list']
                        },{
                            title: '商品主图视频审核',
                            path: '/student/goods-video-verify',
                            auth: ['__auto_by_action:student-shop_goods\\cover_video_audit_list']
                        },{
                            title: '素材库',
                            children: [
                                {
                                    title: '素材库列表',
                                    path: '/student/material-list',
                                    auth: ['__auto_by_action:student-shop_goods_share_material\\get_list']
                                },
                                {
                                    title: '素材库审核列表',
                                    path: '/student/material-examine-list',
                                    auth: ['__auto_by_action:student-shop_goods_share_material\\get_verify_list']
                                }
                            ]
                        },{
                            title: '优惠券',
                            children: [
                                {
                                    title: '优惠券列表',
                                    path: '/student/coupon-list',
                                    auth: ['__auto_by_action:student-shop_goods_coupon\\get_list']
                                },
                                {
                                    title: '优惠券审核列表',
                                    path: '/student/coupon-examine-list',
                                    auth: ['__auto_by_action:student-shop_goods_coupon\\audit']
                                },
                                {
                                    title: '商家优惠券列表',
                                    path: '/student/shop-coupon-list',
                                    auth: ['__auto_by_action:student-shop_goods_coupon\\get_shop_coupon_list']
                                },
                            ]
                        },{
                            title: '红包',
                            children: [
                                {
                                    title: '红包列表',
                                    path: '/student/red-packet-list',
                                    auth: ['__auto_by_action:student-shop_goods_red_packet\\get_list']
                                },
                                {
                                    title: '红包审核列表',
                                    path: '/student/red-packet-examine-list',
                                    auth: ['__auto_by_action:student-shop_goods_red_packet\\audit']
                                }
                            ]
                        },{
                            title: '一卡通管理',
                            children: [
                                {
                                    title: '一卡通',
                                    path: '/student/member-card-list',
                                    auth: ['__auto_by_action:student-student_vip\\get_list']
                                },
                                {
                                    title: '一卡通专区',
                                    path: '/student/member-area-list',
                                    auth: ['__auto_by_action:student-shop_vip_goods\\get_list']
                                },
                                {
                                    title: '1分钱商品专区',
                                    path: '/student/zero-area-list',
                                    auth: ['__auto_by_action:student-shop_vip_free\\get_list']
                                },
                                // {
                                //     title: '海报设置',
                                //     path: '/student/member-poster-list',
                                //     auth: ['__auto_by_action:student-shop_vip_banner\\get_list']
                                // }
                            ]
                        },{
                            title: '活动管理',
                            children: [
                                {
                                    title: '平台大促',
                                    path: '/student/activity-manage-list',
                                    auth: ['__auto_by_action:student-activity\\get_list'],
                                },
                                {
                                    title: '倒计食',
                                    children: [
                                        {
                                            title: '商品审核',
                                            path: '/student/advent-goods-verify',
                                            auth: ['__auto_by_action:student-shop_goods_activity_near_exp\\get_list']
                                        }
                                    ]
                                },
                                {
                                    title: '疯狂星期五',
                                    children: [
                                        {
                                            title: '商品审核',
                                            path: '/student/crazy-friday-goods-verify',
                                            auth: ['__auto_by_action:student-shop_goods_activity_friday_sale\\get_list']
                                        },
                                        {
                                            title: '往期记录',
                                            path: '/student/crazy-friday-history',
                                            auth: ['__auto_by_action:student-shop_goods_activity_friday_sale\\get_list']
                                        }
                                    ]
                                },
                                {
                                    title: '限时秒杀',
                                    children: [
                                        {
                                            title: '活动列表',
                                            path: '/student/seckill-activity-list',
                                            auth: ['__auto_by_action:student-shop_goods_flash_sale_activity\\get_list']
                                        },
                                        {
                                            title: '活动排期',
                                            path: '/student/seckill-schedule-list',
                                            auth: ['__auto_by_action:student-shop_goods_flash_sale\\get_list']
                                        },
                                        {
                                            title: '商品数据',
                                            path: '/student/seckill-goods-data',
                                            auth: ['__auto_by_action:student-shop_goods_flash_sale_activity\\get_goods_statistic_list']
                                        }
                                    ]
                                }
                            ]
                        },{
                            title: '抽奖活动列表',
                            path: '/student/luck-draw-list',
                            auth: ['__auto_by_action:student-shop_tool\\lottery\\get_list']
                        },{
                            title: '新人专区',
                            path: '/student/new-people-list',
                            auth: ['__auto_by_action:student-shop_welfare\\get_list']
                        },{
                            title: '商品分类',
                            path: '/student/goods-classify',
                            auth: ['__auto_by_action:student-shop_goods_type\\get_list']
                        },{
                            title: '商品组',
                            path: '/student/jingang-area-list',
                            auth: ['__auto_by_action:student-shop_goods_cate\\get_list']
                        },{
                            title: '金刚区',
                            path: '/student/shop-peter',
                            auth: ['__auto_by_action:student-shop_custom_area\\get_list']
                        },
                        // {
                        //     title: '商家推荐',
                        //     path: '/student/recommend-shop-list',
                        //     auth: ['__auto_by_action:student-shop\\get_recommend_list']
                        // },
                        {
                            title: '店铺管理',
                            children: [
                                {
                                    title: '店铺管理',
                                    path: '/student/shop-list',
                                    auth: ['__auto_by_action:student-shop\\get_list']
                                },
                                {
                                    title: '退店管理',
                                    path: '/student/return-shop-list',
                                    auth: ['__auto_by_action:student-shop_close_apply\\get_list']
                                },
                                {
                                    title: '店铺数据',
                                    path: '/student/shop-data-list',
                                    auth: ['__auto_by_action:student-statistic_shop\\get_shop_statistic_list']
                                }
                            ],

                        },{
                            title: '财控管理',
                            children: [
                                {
                                    title: '店铺补贴风控',
                                    path: '/student/shop-control',
                                    auth: ['__auto_by_action:student-finance_control_shop\\get_shop_control_list']
                                },
                                {
                                    title: '平台补贴计划',
                                    path: '/student/platform-control',
                                    auth: []
                                },
                                {
                                    title: '财控岗位管理',
                                    path: '/student/platform-list',
                                    auth: []
                                }
                            ],

                        },{
                            title: '店铺公告',
                            path: '/student/shop-notice',
                            auth: ['__auto_by_action:student-hire_announce\\get_list']
                        }
                        // ,{
                        //     title: '双十一审核商品',
                        //     path: '/student/shop-eleven-active',
                        //     auth: ['__auto_by_action:student-activity\\a20201111_get_list']
                        // }
                            ,{
                            title: '审核商品',
                            path: '/student/active-goods-verify',
                            auth: ['__auto_by_action:student-activity\\a20201212_get_list']
                        },{
                            title: '审核店铺公告',
                            path: '/student/shop-notice-boss',
                            auth: ['__auto_by_action:student-hire_announce\\audit']
                        },{
                            title: '客服管理',
                            path: '/student/kf_admin',
                            auth: ['__auto_by_action:student-shop_kf\\get_list']
                        },
                        {
                            title: '订单管理',
                            children: [
                                {
                                    title: '订单列表',
                                    path: '/student/order-list',
                                    auth: ['__auto_by_action:student-shop_goods_order\\get_list']
                                },{
                                    title: '纠纷单列表',
                                    path: '/student/dispute-list',
                                    auth: ['__auto_by_action:student-shop_goods_order_dispute\\get_list']
                                },{
                                    title: '维权列表',
                                    path: '/student/good-after-list',
                                    auth: ['__auto_by_action:student-shop_goods_order_cancel_apply\\get_list']
                                },{
                                    title: '订单评价',
                                    path: '/student/order-comment',
                                    auth: ['__auto_by_action:student-shop_goods_order_review\\get_list']
                                }
                            ]
                        },
                        {
                            title: '否词过滤',
                            path: '/student/keword-filter',
                            auth: ['__auto_by_action:student-shop_goods_ignore_word\\get_list']
                        },
                        {
                            title: '邀请有礼',
                            children: [
                                {
                                    title: '邀请详情',
                                    path: '/student/polite',
                                    auth: ['__auto_by_action:student-student_user_invite_award\\get_list']
                                },
                                {
                                    title: '商品详情',
                                    path: '/student/polite-goods-list',
                                    auth: ['__auto_by_action:student-student_user_invite_award_goods\\get_list']
                                }
                            ]
                        },
                        {
                            title: 'APP店铺公告审核',
                            path: '/student/app-shop-notice-verify',
                            auth: ['__auto_by_action:student-shop_announce\\get_list']
                        },
                        {
                            title: '邀请助力',
                            path: '/student/invitation-help-list',
                            auth: ['__auto_by_action:student-shop_goods_help_shopping\\get_list']
                        },
                        {
                            title: '寝室专区',
                            path: '/student/dorm-goods-verify',
                            auth: ['__auto_by_action:student-shop_tool\\goods_submit_d202103\\get_list']
                        },
                        {
                            title: '砍价活动',
                            children: [
                                {
                                    title: '活动管理',
                                    path: '/student/bargain-activity-list',
                                    auth: ['__auto_by_action:student-shop_tool_bargain\\activity\\get_list']
                                },
                                {
                                    title: '用户管理',
                                    path: '/student/bargain-activity-initiator-list',
                                    auth: ['__auto_by_action:student-shop_tool_bargain\\apply\\get_apply_list']
                                },
                                {
                                    title: '黑名单',
                                    path: '/student/bargain-activity-blacklist',
                                    auth: ['__auto_by_action:student-shop_tool_bargain\\student_block\\get_list']
                                }
                            ]
                        },
                        {
                            title: '社群专享价',
                            path: '/student/group-goods-list',
                            auth: ['__auto_by_action:student-shop_tool_group_goods\\get_list']
                        },
                        {
                            title: '新客首单立减',
                            children: [
                                {
                                    title: '立减设置',
                                    path: '/student/first-order-discount-settings',
                                    auth: ['__auto_by_action:student-shop_new_user_discount\\set_config']
                                },
                                {
                                    title: '峰值数据',
                                    path: '/student/first-order-discount-statistics',
                                    auth: []
                                }
                            ]
                        },
                        {
                            title: '商家问卷',
                            path: '/student/shop-questionnaire-list',
                            auth: ['__auto_by_action:student-shop_questionnaire\\get_list']
                        },
                        ]
                    },
                    {
                        title: '社交',
                        children: [{
                            title: '学生身份认证审核',
                            path: '/student/student-verify-list',
                            auth: ['__auto_by_action:student-student_user_student_verify\\get_list']
                        },{
                            title: '夸夸我的大学',
                            children: [{
                                title: '评论审核管理',
                                path: '/student/comment-examine',
                                auth: ['__auto_by_action:student-social_schoolpraise\\get_verify_list']
                            },{
                                title: '评论数据管理',
                                path: '/student/comment-data',
                                auth: ['__auto_by_action:student-social_schoolpraise\\get_list']
                            },{
                                title: '评论举报管理',
                                path: '/student/comment-report',
                                auth: ['__auto_by_action:student-social_schoolpraise_report\\get_list']
                            }]
                        },{
                            title: '学校数据',
                            path: '/student/social-school',
                            auth: ['__auto_by_action:student-forum\\get_list']
                        },
                        // v2.1.6隐藏班级管理
                        /*{
                            title: '班级管理',
                            children: [
                                {
                                    title: '班级信息管理',
                                    path: '/student/social-class-list',
                                    auth: ['__auto_by_action:student-region_class\\get_list']
                                },
                                {
                                    title: '班级信息审核',
                                    path: '/student/social-class-verify',
                                    auth: ['__auto_by_action:student-region_class_student_submit\\get_list']
                                },
                                {
                                    title: '班级认证列表',
                                    path: '/student/social-class-auth',
                                    auth: []
                                },
                                {
                                    title: '创建同校班级',
                                    path: '/student/create-class',
                                    auth: []
                                }
                            ]
                        },*/
                        // {
                        //     title: '班级审核',
                        //     path: '/student/social-examine',
                        //     auth: ['__auto_by_action:student-forum_class_join_apply\\get_list']
                        // },
                        // {
                        //     title: '反馈数据',
                        //     path: '/student/data-feedback',
                        //     auth: ['__auto_by_action:student-forum_exam_count\\get_list']
                        // },
                        {
                            title: '试题列表',
                            path: '/student/social-questions',
                            auth: ['__auto_by_action:student-exam_question\\get_list']
                        },{
                            title: '试题结果',
                            children: [{
                                title: '试题结果',
                                path: '/student/social-result',
                                auth: ['__auto_by_action:student-exam_submit\\get_list'],
                            },{
                                title: '反馈管理',
                                path: '/student/feedback-management',
                                auth: ['__auto_by_action:student-forum_exam_report\\get_list']
                            }]
                        },
                        {
                            title: '用户列表',
                            path: '/student/social-user',
                            auth: ['__auto_by_action:student-forum_student\\get_list']
                        },
                        // ,{
                        //     title: '内容列表',
                        //     path: '/student/social-cont',
                        //     auth: ['__auto_by_action:student-forum_post\\get_list']
                        // }
                        {
                            title: '举报列表',
                            path: '/student/social-report',
                            auth: ['__auto_by_action:student-forum_report\\get_list']
                        },{
                            title: '客服二维码设置',
                            path: '/student/social-code',
                            auth: ['__auto_by_action:student-customer_service\\get']
                        },{
                            title: '兴趣标签',
                            children: [{
                                title: '标签分类',
                                path: '/student/social-label',
                                auth: ['__auto_by_action:student-student_tag_group\\get_list']
                            },{
                                title: '标签名称',
                                path: '/student/social-label-name',
                                auth: ['__auto_by_action:student-student_tag\\get_list']
                            }]
                        },{
                            title: 'IM表情包管理',
                            path: '/student/social-im',
                            auth: ['__auto_by_action:student-chat_emoji\\get_list']
                        }]
                    },
                    {
                        title: '标签管理',
                        children: [{
                            title: '标签分类管理',
                            path: '/student/label-ification',
                            auth: ['__auto_by_action:student-tag_group\\get_list']
                        },{
                            title: '标签库管理',
                            path: '/student/label-system',
                            auth: ['__auto_by_action:student-tag\\get_list']
                        }]
                    },
                    {
                        title: '掌大精英',
                        children: [{
                            title: '员工激励设置',
                            path: '/student/company-staff-seting',
                            auth: ['__auto_by_action:student-stuagent_employee_link\\get_list']
                        },{
                            title: '掌大精英管理',
                            path: '/student/student-administration',
                            auth: ['__auto_by_action:student-stuagent\\get_stuagent_list']
                        },{
                            title: '掌大精英数据',
                            path: '/student/student-data',
                            auth: ['__auto_by_action:student-stuagent_rebate\\get_rebate_list']
                        },
                        // ,{
                        //     title: '分配粉丝',
                        //     path: '/student/student-fans',
                        //     auth: ['__auto_by_action:student-stuagent_fans\\get_fans_list']
                        // }
                        {
                            title: '任务项',
                            path: '/student/elite-task',
                            auth: ['__auto_by_action:student-hand_ees\\export']
                        },{
                            title: '临时邀请码',
                            path: '/student/student-code',
                            auth: ['__auto_by_action:student-stuagent_temp_invite_code\\get_list']
                        },{
                            title: '精英申请审核',
                            path: '/student/elite-examine',
                            auth: ['__auto_by_action:student-stuagent_apply\\get_list']
                        },{
                            title: '精英升降级记录',
                            path: '/student/elite-level-change-list',
                            auth: ['__auto_by_action:student-stuagent\\get_stuagent_level_list']
                        }
                        // ,{ //1.3.5版本移除
                        //     title: '掌大精英动态',
                        //     path: '/student/elite-dynamics',
                        //     auth: ['__auto_by_action:student-stuagent_rebate\\get_rebate_list']
                        // }
                        ]
                    },
                    {
                        title: '自定义表单',
                        children: [
                            {
                                title: '表单场景',
                                path: '/student/form-scene',
                                auth: ['__auto_by_action:student-custom_form\\get_scene_form_list']
                            },{
                                title: '表单管理',
                                path: '/student/student-form',
                                auth: ['__auto_by_action:student-custom_form\\get_list']
                            }]
                    },
                    {
                        title: '客服系统',
                        children: [
                            {
                                title: '会话设置',
                                path: '/student/custom-server',
                                auth: ['__auto_by_action:student-customer_service_zsdx_config\\get']
                            },{
                                title: '客服管理',
                                path: '/student/custom-management',
                                auth: ['__auto_by_action:student-customer_service_zsdx\\get_list']
                            },{
                                title: '工作报表',
                                path: '/student/custom-form',
                                auth: []
                            }]
                    },
                    {
                        title: 'Push列表管理',
                        path: '/student/push',
                        auth: ['__auto_by_action:student-message_push\\get_list']
                    },
                    {
                        title: '验证码',
                        path: '/student/app-phone-code',
                        auth: ['__auto_by_action:student-student_user_temp_login_code\\get_list']
                    },
                    {
                        title: '客户利润监控',
                        path: '/student/kf-profit',
                        auth: ['__auto_by_action:student-shop_profit\\get_list']
                    },
                    {
                        title: 'APP充值记录',
                        path: '/student/recharge-record',
                        auth: ['__auto_by_action:student-finance\\get_recharge_list']
                    },
                    {
                        title: 'EES统计数据',
                        path: '/student/ees-ticsdata',
                        auth: ['__auto_by_action:student-hand_ees\\export']
                    },
                    {
                        title: '财务管理',
                        children: [
                            {
                                title: '财务明细',
                                path: '/student/finance-list',
                                auth: ['__auto_by_action:student-finance\\get_list']
                            },{
                                title: '开具发票',
                                path: '/student/invoice',
                                auth: ['__auto_by_action:student-hire_invoice\\get_list']
                            }]
                    },{
                        title: '意见反馈',
                        path: '/student/feedback',
                        auth: ['__auto_by_action:student-student_complain\\get_list']
                    },{
                        title: '用户管理',
                        path: '/student/user-manage-list',
                        auth: ['__auto_by_action:student-student_user\\get_list']
                    },{
                        title: 'APP轮播图列表',
                        path: '/student/app-banner-list',
                        auth: ['__auto_by_action:student-banner\\get_list']
                    },{
                        title: 'APP弹窗列表',
                        path: '/student/popup',
                        auth: ['__auto_by_action:student-popup\\get_list']
                    },{
                        title: '热门搜索',
                        children: [{
                            title: '热门搜索',
                            path: '/student/hot-keyword',
                            auth: ['__auto_by_action:student-search_keyword\\get_list']
                        },{
                            title: '搜索框默认词',
                            path: '/student/app-hot-search',
                            auth: ['__auto_by_action:student-search_default_keyword\\get_list']
                        }]
                    },
                    {
                        title: 'APP搜索记录',
                        path: '/student/app-search',
                        auth: ['__auto_by_action:student-search_log\\get_rank_list']
                    }, {
                        title: '校园精英PK赛',
                        children: [{
                            title: '活动列表',
                            path: '/student/elite-pk-activity-list',
                            auth: ['__auto_by_action:student-task_stuagent_extra_pk_activity\\activity_config\\get_list']
                        },{
                            title: '统计列表',
                            path: '/student/elite-pk-statistics',
                            auth: ['__auto_by_action:student-task_stuagent_extra_pk_activity\\activity_statistic\\get_stuagent_ranking_list']
                        },{
                            title: '用户参与列表',
                            path: '/student/elite-pk-apply-list',
                            auth: ['__auto_by_action:student-task_stuagent_extra_pk_activity\\student_apply\\get_list']
                        },]
                    },
                    ]
                },
                {
                    title: '官网',
                    icon: 'xianxialuyan',
                    isRoot: true,
                    children: [
                        {
                            title: '商家增值服务',
                            children: [
                                {
                                    title: '寝室视频上传',
                                    children: [
                                        {
                                            title: '批次组列表',
                                            path: '/bid/dorm-video-list',
                                            auth: ['__auto_by_action:student-room_series\\get_list']
                                        },
                                        {
                                            title: '商家列表',
                                            path: '/bid/video-company-list',
                                            auth: ['__auto_by_action:student-room_series\\get_link_hire_list']
                                        }
                                    ]
                                },
                                {
                                    title: '寝室视频审核',
                                    children: [
                                        {
                                            title: '视频审核',
                                            path: '/bid/dorm-examine-list',
                                            auth: ['__auto_by_action:student-room_series\\get_list']
                                        },
                                        {
                                            title: '商家列表',
                                            path: '/bid/dorm-examine-company-list',
                                            auth: ['__auto_by_action:student-room_series\\get_list']
                                        }
                                    ]
                                },
                                {
                                    title: '寝室视频推广进度',
                                    children: [
                                        {
                                            title: '批次组列表',
                                            path: '/bid/dorm-extension-list',
                                            auth: ['__auto_by_action:student-room_series_task\\get_list'],
                                        },
                                        {
                                            title: '推广商家列表',
                                            path: '/bid/extension-company-list',
                                            auth: ['__auto_by_action:student-room_series_task\\get_link_hire_list'],
                                        }
                                    ]
                                },
                                {
                                    title: '商家物料清单列表',
                                    path: '/bid/shop-materiel',
                                    auth: ['__auto_by_action:student-hire_room_series_material\\get_list']
                                }
                            ]
                        },
                        {
                            title: '企业数据列表',
                            path: '/bid/hire-list',
                            auth: ['__auto_by_action:wei4-hire_user\\get_list']
                        },
                        {
                            title: '官网线索与审核',
                            path: '/bid/sales-leads',
                            auth: ['__auto_by_action:student-hire_user_shop_verify\\get_list']
                        },
                        {
                            title: '我的线索',
                            path: '/bid/my-sales-leads',
                            auth: ['__auto_by_action:student-hire_user_sales_leads\\get_my_list']
                        },
                        /*{
                            title: '学生入驻审核',
                            path: '/bid/student-shop-verify',
                            auth: []
                        },*/
                        {
                            title: '企业认证审核',
                            path: '/bid/hire-auth-examine',
                            auth: ['__auto_by_action:student-hire_user_company_verify\\get_list']
                        },
                        {
                            title: '官网自定义',
                            children: [
                                {
                                    title: 'Banner管理',
                                    path: '/student/zdbanner',
                                    auth: ['__auto_by_action:wei4-base\\banner\\get_list']
                                },
                                {
                                    title: '校园品牌说',
                                    path: '/student/zd-websit-brand',
                                    auth: ['__auto_by_action:wei4-hire_brand\\get_list']
                                }
                            ]
                        },
                        {
                            title: '帮助中心管理',
                            path: '/bid/help',
                            auth: ['__auto_by_action:student-hire_help\\get_list']
                        },
                        {
                            title: '竞标列表',
                            path: '/bid/bid-list',
                            auth: ['__auto_by_action:wei4-bid\\get_list']
                        },
                        {
                            title: '活动列表',
                            path: '/bid/activity-list',
                            auth: ['__auto_by_action:wei4-sponsor_activity\\get_list']
                        },
                        {
                            title: '广告位列表',
                            path: '/bid/station-list',
                            auth: ['__auto_by_action:wei4-sponsor_activity\\get_adv_config_list']
                        },
                        {
                            title: '赞助结算',
                            path: '/bid/sponsor-settlement',
                            auth: ['__auto_by_action:wei4-sponsor_activity\\get_hire_sponsor_list']
                        },
                        {
                            title: '资源分类列表',
                            path: '/bid/resource-type-list',
                            auth: ['__auto_by_action:wei4-resource_type\\get_list']
                        },
                        {
                            title: '资源列表',
                            path: '/bid/resource-list',
                            auth: ['__auto_by_action:wei4-resource\\get_list']
                        },
                        // {
                        //     title: '轮播图管理',
                        //     path: '/bid/banner-list',
                        //     auth: ['__auto_by_action:wei4-base\\banner\\get_list']
                        // },
                        {
                            title: '校园媒体列表',
                            path: '/bid/supply-list',
                            auth: ['__auto_by_action:wei4-supply_user\\get_list']
                        },
                        {
                            title: '企业合同',
                            path: '/bid/cantract-list',
                            auth: ['__auto_by_action:wei4-hire_contract\\get_list']
                        },
                        {
                            title: '权益分类列表',
                            path: '/bid/right-type-list',
                            auth: ['__auto_by_action:wei4-benefit_type\\get_list']
                        },
                        {
                            title: '权益列表',
                            path: '/bid/right-list',
                            auth: ['__auto_by_action:wei4-benefit\\get_list']
                        },
                        {
                            title: '账单日志',
                            path: '/bid/check-list',
                            auth: ['__auto_by_action:wei4-hire_user_log\\get_list']
                        },
                        {
                            title: '资料库标签',
                            path: '/bid/material-tags',
                            auth: ['__auto_by_action:wei4-material_tag\\get_list']
                        },
                        {
                            title: '资料库',
                            path: '/bid/material-list',
                            auth: ['__auto_by_action:wei4-material\\get_list']
                        },
                        {
                            title: '财务列表',
                            path: '/bid/finance-list',
                            auth: ['__auto_by_action:wei4-finance\\finance_system_order\\get_list']
                        },
                        {
                            title: '身份证审核',
                            path: '/bid/supply-account-verify',
                            auth: ['__auto_by_action:wei4-supply_account\\get_list']
                        },
                        {
                            title: '前台搜索记录',
                            path: '/bid/search-log',
                            auth: []
                        },
                        {
                            title: '发票管理',
                            path: '/bid/invoice-list',
                            auth: ['__auto_by_action:wei4-hire_invoice\\get_list']
                        },
                        {
                            title: '企业认证管理',
                            path: '/bid/certification-list',
                            auth: ['__auto_by_action:wei4-hire_certification\\get_list']
                        }
                    ]
                },
                {
                    title: '设置',
                    icon: 'shezhi',
                    isRoot: true,
                    children: [
                        {
                            title: '员工管理',
                            children: [
                                {
                                    title: '部门列表',
                                    path: '/settings/company-department-list',
                                    auth: []
                                },{
                                    title: '岗位列表',
                                    path: '/settings/company-post-list',
                                    auth: []
                                },
                                {
                                    title: '员工列表',
                                    path: '/settings/user-list',
                                    auth: []
                                }
                            ]
                        },
                        {
                            title: '用户组列表',
                            path: '/settings/user-group-list',
                            auth: ['__auto_by_action:__local-system\\user_group\\get_list']
                        },
                        {
                            title: '权限分组配置',
                            path: '/settings/auth-group',
                            auth: ['__auto_by_action:__local-system\\auth_group\\get_list']
                        },
                        {
                            title: '权限列表',
                            path: '/settings/auth',
                            auth: ['__auto_by_action:__local-system\\auth_group\\get_list',
                                '__auto_by_action:__local-system\\auth\\get_list']
                        },
                        {
                            title: '服务列表',
                            path: '/settings/service',
                            auth: '__auto_by_action:__local-system\\provider\\get_list'
                        }
                    ]
                }
            ],
        };
    },
    watch: {
        $route(val) {
            this.navActive = val.path;
        }
    },
    computed: {
        ...mapState({
            list: state => state.header.header,
            deviceType: state => state.sysinfo.deviceType
        })
    },
    created() {
        this.TO = this.$route.query.TO;
        this.navActive = this.$route.path;
        this.getUserinfo();
        this.getAuthOfUser();
        if(this.deviceType == 'mobile'){
            this.showSlider = false;
        }
    },
    methods: {
        /**
             * 获取用户信息
             */
        getUserinfo() {
            this.$post('/__local/user_center%5Cget_user_info', {}, resp => {
                if (resp.code == 1) {
                    this.userinfo = resp.data;
                    this.$store.commit('userinfo/SET_USERINFO', resp.data);
                }
            });
        },

        /** 根据菜单列表有权限的链接,生成需要展示的菜单 */
        getMenuAuth(tmpMenu){
            let menuRes = [];

            // 县两级;
            for(var i in tmpMenu){
                let hasChild = false;

                if(!tmpMenu[i].children){
                    if(tmpMenu[i].authed){
                        hasChild = true;
                    }
                }else{
                    tmpMenu[i].children = this.getMenuAuth(tmpMenu[i].children);
                    if(tmpMenu[i].children.length > 0){
                        hasChild = true;
                    }
                }

                if(hasChild){
                    menuRes.push(tmpMenu[i]);
                }
            }
            return menuRes;
        },

        /** 获取用户已有权限 */
        getAuthOfUser() {
            this.$post('/__local/user_center%5Cget_valid_auth_list', {}, resp => {
                if (resp.code == 1) {
                    this.userAuth = resp.data.list;
                    let tmpMenu = this.handleGenerateMenuList(this.menuSourceList);

                    this.menuList = this.getMenuAuth(tmpMenu);
                    this.$store.commit('SET_AUTH_LIST', this.userAuth);
                    if (this.TO) {
                        let to = JSON.parse(unescape(this.TO));

                        this.TO = '';
                        if (to.path != this.$route.path) {
                            this.$router.replace(to);
                        }
                    }
                }
            });
        },

        checkAuthInList(str, list) {
            for (var i in list) {
                if (escape(str) == escape(list[i].name)) {
                    return true;
                }
            }
            return false;
        },

        hasAuth(auth, list) {
            let authResult = false;

            if (Array.isArray(auth)) {
                for (var k in auth) {
                    if (!this.checkAuthInList(auth[k], list)) {
                        return false;
                    }
                }
                // console.log(auth[k], true);
                return true;
            } else {
                return this.checkAuthInList(auth, list);
            }
        },

        /**
             * 生成菜单
             */
        handleGenerateMenuList(menuList) {
            let result = [];

            for (var i in menuList) {
                if (menuList[i].auth) {
                    if (this.hasAuth(menuList[i].auth, this.userAuth)) {
                        let tmp = Object.assign({}, menuList[i]);

                        if (tmp.children && tmp.children.length > 0) {
                            tmp.children = this.handleGenerateMenuList(tmp.children);
                        }
                        tmp.authed = true;
                        result.push(tmp);
                    }
                } else {
                    let tmp = Object.assign({}, menuList[i]);

                    if (tmp.children && tmp.children.length > 0) {
                        tmp.children = this.handleGenerateMenuList(tmp.children);
                    }
                    tmp.authed = true;

                    result.push(tmp);
                }

            }
            return result;
        },

        /**
         * 重置密码
         */
        handleResetPsd() {
            this.$refs.ruleForm.validate(valid => {
                if (valid) {
                    this.$post('/__local/user_center%5Creset_password', {
                        old_password: this.resetPsdForm.old,
                        password: this.resetPsdForm.new
                    }, resp => {
                        if (resp.code == 1) {
                            this.$message({
                                type: 'success',
                                message: '修改密码成功'
                            });
                            this.dialogVisible = false;
                        } else {
                            this.$message({
                                type: 'warning',
                                message: resp.msg || '修改密码失败'
                            });
                        }
                    });
                }
            });
        },

        /**
             * 退出登陆
             */
        handleLogout() {
            this.$post("/__local/user%5Clogout", {}, resp => {
                if (resp.code == 1) {
                    this.$router.replace({
                        name: "Login"
                    });
                }
            });
        },

        handleCheckAuth () {
            window.open('https://zsdx.yuque.com/docs/share/96e3a5af-ff33-4ebc-b61d-87ae9fb023cb?#kqY7', '_blank');
        }
    }
};
</script>


<style lang="less" scoped>
    .index-container {
      height: 100%;
    }
    .header-index{
        line-height: 54px;
        overflow: hidden;
    }
    .header-left{
        height: 54px;
        line-height: 54px;
        .bread{
            margin-top: 27px;
            transform: translateY(-50%);
        }
    }
    .header-right{
        text-align: right;
    }
    .slider-btn{
        position: fixed;
        left: 0;
        top: 60px;
        background: #002548;
        z-index:999999;
        padding: 10px;
        transition: all 0.3s ease-in-out;
        cursor: pointer;
        .iconfont{
            font-size: 18px;
            color: #fff;
        }
        &-show{
            top: 8px;
        }
    }
    .aside {
      display: flex;
      flex-direction: column;
      background-color: rgba(0,47,91,1);
      transition: transform 0.3s ease-in-out;
      position: absolute;
      left: 0;
      top:0;
      bottom:0;
      transform: translateX(-210px);
      z-index: 1000;
      &-show{
          position: unset;
          transform: translateX(0);
      }
      h1 {
        height: 54px;
        font-size: 0;
        line-height: 54px;
        color: #fff;
        text-align: center;
        background-color: #002548;

        span,
        i {
          vertical-align: middle;
        }

        span {
          font-size: 20px;
        }

        .el-icon-hand-logo {
          margin-right: 10px;
          font-size: 32px;
          color: #1890ff;
        }
      }

      .userinfo-wrapper {
        padding: 20px 60px 40px;
        font-size: 16px;
        line-height: 22px;
        color: #fff;
        text-align: center;
        background: #002548;
        .username {
          margin-bottom: 12px;
          padding-bottom: 12px;
          border-bottom: 1px solid rgba(255, 255, 255, 0.3);

        }

        .el-button--text {
          padding: 0;
          color: #fff;
        }
      }
    }
    .user_auth {
        white-space: nowrap;
        font-size: 14px;
        position: relative;
        top: 1px;
        left: -6px;
        cursor: pointer;
    }
    .el-header {
      position: relative;
      padding: 0;

      &::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 1px;
        background-color: #e8e8e8;
      }
      .el-row {
        padding: 0 20px;
        background-color: #fff;
      }
      .el-breadcrumb {
        line-height: 22px;
      }
      h3 {
        font-size: 20px;
        line-height: 28px;
      }
    }
    .main {
      padding: 0;
    }
    .page-header {
      font-weight: bold;
    }
</style>

<style lang="less">
    .index-container {
      .main {
        display: flex;

        .container {
          flex: 1;
        }
      }
      .el-menu {
        flex: 1;
        overflow: auto;
        border-right: none;
      }
      .el-menu::-webkit-scrollbar{
            width: 1px !important;
        }
      .el-breadcrumb__inner.is-link {
        font-weight: normal !important;
        color: #606266;
        &:hover {
            color: #1890ff;
        }
      }
      .el-form-item__label {
          &::before {
              display: none;
          }
      }
    }
    .index-userinfo-popover {
      min-width: auto;

      li {
        cursor: pointer;

        & + li {
          margin-top: 5px;
        }
      }
    }
</style>
